export const getSizeRatio = () => {
  // 默认字体
  const defaultSize = 10;
  // dpi不是1就放大
  const ratio = devicePixelRatio > 1 ? 1.5 : 1;
  // 基准屏幕宽度
  const defaultScreenWidth = 1920;
  const screenW = Math.max(screen.width, screen.height);
  const size =
    (defaultSize / devicePixelRatio) *
    ratio *
    ((screenW * devicePixelRatio) / defaultScreenWidth);
  return size;
};
